#include "common/assert.h"
#include "os/thread.h"
#include "win32/lean_windows.h"

static DWORD WINAPI thread_proc(LPVOID param)
{
	Thread_Fun fun = (Thread_Fun) param;
	fun();
	return 0;
}

void Thread::start_thread(Thread_Fun fun)
{
	ULONG thread_id = 0;

	HANDLE result = CreateThread(
		0,
		0,
		thread_proc,
		(LPVOID) fun,
		0,
		&thread_id);

	ASSERT(result);

	CloseHandle(result);
}

void Thread::terminate_current_thread()
{
}
